home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / comm / bbs / TA1_22.lha / Rexx / Logon.trans < prev    next >
Text File  |  1994-03-23  |  3KB  |  93 lines

  1. /* Logon macro for TransAmiga
  2.  
  3.    Asks user if he/she wishes to view the new message list.  Then prompt
  4.    him/her to do a mail check, and allows the user to read and messages to
  5.    him/her.  Also prompts for a new files listing.
  6. */
  7.  
  8. options results
  9. options failat 10
  10.  
  11. CSI        = '1b'x||'['
  12. CRLF    = '0d'x||'0a'x
  13. FF        = '0c'x
  14.  
  15. userinfo 'x' ; ansi=result
  16.  
  17. /* Initialize ANSI variables - useful code section for your ARexx macros. */
  18. if ansi='ON' then do
  19.     OFF = CSI'0m' ; BO = CSI'1m' ; UL = CSI'4m' ; IT = CSI'3m'
  20.     CL1 = CSI'31m' ; CL2 = CSI'32m' ; CL3 = CSI'33m' ; CL4 = CSI'34m'
  21.     CL5 = CSI'35m' ; CL6 = CSI'36m' ; CL7 = CSI'37m'
  22. end
  23. else do
  24.     OFF = '' ; BO = '' ; UL = '' ; IT = ''
  25.     CL1 = '' ; CL2 = '' ; CL3 = '' ; CL4 = ''
  26.     CL5 = '' ; CL6 = '' ; CL7 = ''
  27. end    
  28.  
  29. if ~show('L',"rexxsupport.library") then 
  30.     call addlib "rexxsupport.library",0,-30
  31.  
  32. /* check if the user has a transfer protocol choosen */
  33. PRINT FF
  34. USERINFO i              /* get user's transfer protocol */
  35. IF RESULT='0' THEN DO
  36.   USERINFO H            /* get the language (in this case English is default and German the second one available) */
  37.   IF RESULT='DEFAULT' THEN DO
  38.     PRINT 'TransAmiga now offers a new feature: Transferprotocol is selected one'
  39.     PRINT 'time and then used for every transfer without the need to ask you'
  40.     PRINT 'again.'
  41.     LISTPROTOCOLS
  42.     QUERY 'Please enter the numer of the protocol you wish to use:'
  43.   END
  44.   ELSE DO
  45.     PRINT 'TransAmiga bietet nun die Moeglichkeit das Transferprotokoll einmalig'
  46.     PRINT 'einzustellen und es dann ohne weitere Neuanwahl bei jedem Transfer zu'
  47.     PRINT 'benutzen.'
  48.     LISTPROTOCOLS
  49.     QUERY 'Bitte Nummer des Transferprotokolls angeben, das sie benutzen wollen:'
  50.   END
  51.   SETPROTOCOL RESULT
  52. END
  53.  
  54. /* Ask to see new message list */
  55. queryy FF||CRLF||CL7||'View new message list'
  56. answ = upper(result)
  57. if ~carrier then exit 10
  58.  
  59. if answ ~= 'N' then newmsgs
  60.  
  61. /* Check for messages to the user.  If any are found, ask if he/she wants */
  62. /* to read them now, and if so, read all marked messages (since all found */
  63. /* messages get automatically marked). */
  64.  
  65. queryn CRLF||CL7||'Check for messages to you'
  66. answ = upper(result)
  67. if ~carrier then exit 10
  68.  
  69. if answ = 'Y' then do
  70.     checkmsgs
  71.     if ~carrier then exit 10
  72.     
  73.     if result=1 then do
  74.         queryy CL7||'Read these messages now'
  75.         answ = upper(result)
  76.         if ~carrier then exit 10
  77.  
  78.         if answ ~= 'N' then readmarkedmsgs
  79.     end
  80. end
  81.  
  82. queryn CRLF||CL7||'View new files'
  83. answ = upper(result)
  84. if ~carrier then exit 10
  85.  
  86. if answ = 'Y' then newfiles
  87.  
  88. print
  89.  
  90. exit
  91.  
  92.  
  93.